package com.bingbaihanji.hibernate.util;
/**
 * @author 冰白寒祭
 * @date 2024-03-23 19:14:25
 * @description //TODO
 */
public class SystemUtil {
    private final String pid;

    public SystemUtil() {
        this.pid = getPid();
    }

    protected SystemUtil(String pid) {
        this.pid = pid;
    }

    public String getPid() {
        try {
            long pid1 = ProcessHandle.current().pid();
            return String.valueOf(pid1);
        }
        catch (Throwable ex) {
            return null;
        }
    }
}
